//管理所有用户相关接口
import request from "@/utils/request";

//登录 --防重名加了Api
export const LoginApi = (data: any) => request.post('/admin/login', data)

// 获取登录用户信息
export const GetUserInfo = () => request.get('/admin/getUserInfo')


/*用户列表*/
// 获取所有用户
export const GetAllUser = (data: any) => request.post('/usersAD/getSearch', data)

// 新增
export const AddNewUser = (data: any) => request.post('/usersAD/addUser', data)

/*用户分组*/
// 获取分组信息
export const GetUserGourp = () => request.get('/userGroupAD/find')

// 添加
export const AddGroup = (data: any) => request.post('/userGroupAD/add', data)

// 删除
export const DelGroup = (data: any) => request.post('/userGroupAD/del', data)

// 修改
export const UpdateGroup = (data: any) => request.post('/userGroupAD/update', data)


/*用户标签*/
//不穿参就是所有，0是父级，传父级 id 就获取子分类
export const GetUserTag = (data: any) => request.get('/tagAD/find', { params: data })

// 添加
export const AddTag = (data: any) => request.post('/tagAD/add', data)

// 删除二级
export const DelTag = (data: any) => request.post('/tagAD/del', data)


/*用户等级*/
// 获取所有用户等级
export const GetUserLevel = (data: any) => request.post('/userLevelAD/find', data)

// 添加用户等级
export const AddLevel = (data: any) => request.post('/userLevelAD/addLevel', data)

// 删除
export const DelLevel = (data: any) => request.post('/userLevelAD/del', data)

// 修改
export const UpdateLevel = (data: any) => request.post('/userLevelAD/update', data)